﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ArriendoVehiculo.LogicaNegocio;

namespace ArriendoVehiculo.Presentacion
{
    /// <summary>
    /// Lógica de interacción para fConsultaCliente.xaml
    /// </summary>
    public partial class fConsultaCliente : Window
    {
        public fConsultaCliente()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Clientes clie = new Clientes();
            var c = clie.recivirCliente(txt_rut.Text);
            if (c != null)
            {
                txt_nombre.Text = c.Nombre;
                txt_apellido.Text = c.Apellido;
                txt_direccion.Text = c.Direccion;
                txt_telefono1.Text = c.Telefono;
                txt_email.Text = c.Email;
            }
            else
            {

                MessageBox.Show("Cliente no existe", "Mensaje",MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
    }
}
